<?
ob_start();
session_start();
include("../conf/config.php");
include("../conf/database.php");
include("../conf/tools.php");

$curTime=getIndianDateTime();
$proj_id=$_GET["proj_id"];
$mode=$_GET["mode"]; 

foreach($_POST as $key => $value) { $arr_data[$key]=$value;}
foreach($arr_data as $key => $value) { $arr_data[$key]=addslashes($value); }

$arr_data["rec_status"]=1;


if($proj_id>0){

update_qry("bkitc_projects",$arr_data,"proj_id=".$proj_id);
qry_data("update bkitc_projects set last_updated='".$curTime."' where proj_id=".$proj_id);

}
else{

	$proj_id=insert_qry("bkitc_projects",$arr_data);
	qry_data("update bkitc_projects set rec_created='".$curTime."' where proj_id=".$proj_id);

}



header("location:edit_proj.php?mode=edit&proj_id=".$proj_id);
?>



